package com.feifan.monthhelper.db.dao;

import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Delete;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;

import com.feifan.monthhelper.bean.db.PainBean;

import java.util.List;

@Dao
public interface PainDao {

    @Query("Select * from pain_feel")
    List<PainBean> getAll();

    @Query("Select * from pain_feel Where date = (:date)")
    PainBean loadByDate(long date);

    @Update
    void update(PainBean... users);

    @Insert
    void insertAll(PainBean... users);
}
